<template>
	<view class="container">
		<view class="information-box">
			<u-cell-group>
				<u-cell icon="setting-fill" title="昵称" :value="info.nickName"></u-cell>
				<u-cell icon="setting-fill" title="手机号" :value="info.wePhone"></u-cell>
				<u-cell icon="setting-fill" title="个人信息编辑" isLink @click="infoEditClick"></u-cell>
				<!-- <u-cell icon="setting-fill" title="收货地址" isLink @click="addressInfoClick"></u-cell>
				<u-cell icon="setting-fill" title="注销" isLink></u-cell> -->
				<u-cell icon="setting-fill" title="版本" value="0.0.3"></u-cell>
			</u-cell-group>
		</view>
		<view style="display: flex; justify-content: center; margin-top: 200rpx">
			<view style="width: 65%">
				<u-button type="primary" @click="quitOutMethod" shape="circle" text="退出登录"></u-button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				options: [{
					text: "删除",
					style: {
						backgroundColor: "#ff3b2a",
					},
				}, ],
				info: {
					wePhone: "",
					nickName: "",
				},
			};
		},
		methods: {
			// 地址列表页
			addressInfoClick() {
				uni.navigateTo({
					url: "/pages-center/AddressList/index",
				});
			},
			quitOutMethod() {
				uni.clearStorageSync()
				uni.navigateTo({
					url: "/pages/Login/index",
				});
			},
			infoEditClick() {
				uni.navigateTo({
					url: "/pages-center/PersonalInformation/index",
				});
			},
		},
		onShow() {
			this.info.wePhone = uni.getStorageSync("wePhone");
			this.info.nickName = uni.getStorageSync("nickName");
		},
	};
</script>

<style lang="scss">
	@import "index.scss";
</style>